//
//  Person.m
//  OC07_作业
//
//  Created by dllo on 15/12/9.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "Person.h"

@implementation Person

- (instancetype)initWithName:(NSString *)name
                         age:(NSInteger)age {
    self = [super init];
    if (self) {
        self.name = [name copy];
        self.age = age;
    }
    return self;
}

+ (instancetype)personWithName:(NSString *)name
                           age:(NSInteger)age {
    Person *person = [Person personWithName:name age:age];
    return [person autorelease];
}

- (void)dealloc {
    [_name release];
    [super dealloc];
}



@end
